package cn.ilovese.collect.vo.Device;

import cn.ilovese.collect.po.device.Device;
import cn.ilovese.collect.vo.report.HistoryReportVO;
import lombok.NoArgsConstructor;
import lombok.NonNull;

@NoArgsConstructor
public class DeviceVO {
    private Integer id;

    private String name;

    private String os;

    private Integer ram;

    private Integer userId;

    private String processorArchitecture;

    public String getName() {
        return name;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getOs() {
        return os;
    }

    public void setOs(String os) {
        this.os = os == null ? null : os.trim();
    }

    public Integer getRam() {
        return ram;
    }

    public void setRam(Integer ram) {
        this.ram = ram;
    }

    public String getProcessorArchitecture() {
        return processorArchitecture;
    }

    public void setProcessorArchitecture(String processorArchitecture) {
        this.processorArchitecture = processorArchitecture == null ? null : processorArchitecture.trim();
    }

    public DeviceVO(@NonNull Device device){
        this.id=device.getId();
        this.processorArchitecture=device.getProcessorArchitecture();
        this.os=device.getOs();
        this.ram=device.getRam();
        this.name=device.getDeviceName();
        this.userId=device.getUserId();
    }
}
